package c.c.b.a.b;

import java.util.concurrent.TimeUnit;

/* compiled from: CacheControl */
public final class i {
    public final boolean a;
    public final boolean b;
    public final int c;
    public final int d;
    public final boolean e;
    public final boolean f;
    public final boolean g;
    public final int h;
    public final int i;
    public final boolean j;
    public final boolean k;
    public final boolean l;
    public String m;

    static {
        TimeUnit.SECONDS.toSeconds((long) Integer.MAX_VALUE);
    }

    public i(boolean z, boolean z2, int i, int i2, boolean z3, boolean z4, boolean z5, int i3, int i4, boolean z6, boolean z7, boolean z8, String str) {
        this.a = z;
        this.b = z2;
        this.c = i;
        this.d = i2;
        this.e = z3;
        this.f = z4;
        this.g = z5;
        this.h = i3;
        this.i = i4;
        this.j = z6;
        this.k = z7;
        this.l = z8;
        this.m = str;
    }

    /* JADX WARNING: Removed duplicated region for block: B:12:0x0041  */
    public static c.c.b.a.b.i a(c.c.b.a.b.v r22) {
        /*
        r0 = r22;
        r1 = r22.a();
        r6 = 0;
        r7 = 1;
        r8 = 0;
        r9 = 0;
        r10 = 0;
        r11 = -1;
        r12 = -1;
        r13 = 0;
        r14 = 0;
        r15 = 0;
        r16 = -1;
        r17 = -1;
        r18 = 0;
        r19 = 0;
        r20 = 0;
    L_0x001a:
        if (r6 >= r1) goto L_0x0150;
    L_0x001c:
        r2 = r0.b(r6);
        r4 = r0.d(r6);
        r3 = "Cache-Control";
        r3 = r2.equalsIgnoreCase(r3);
        if (r3 == 0) goto L_0x0031;
    L_0x002c:
        if (r8 == 0) goto L_0x002f;
    L_0x002e:
        goto L_0x0039;
    L_0x002f:
        r8 = r4;
        goto L_0x003a;
    L_0x0031:
        r3 = "Pragma";
        r2 = r2.equalsIgnoreCase(r3);
        if (r2 == 0) goto L_0x0149;
    L_0x0039:
        r7 = 0;
    L_0x003a:
        r2 = 0;
    L_0x003b:
        r3 = r4.length();
        if (r2 >= r3) goto L_0x0149;
    L_0x0041:
        r3 = "=,;";
        r3 = c.c.b.a.b.a.e.f.a(r4, r2, r3);
        r2 = r4.substring(r2, r3);
        r2 = r2.trim();
        r5 = r4.length();
        if (r3 == r5) goto L_0x00a9;
    L_0x0055:
        r5 = r4.charAt(r3);
        r0 = 44;
        if (r5 == r0) goto L_0x00a9;
    L_0x005d:
        r0 = r4.charAt(r3);
        r5 = 59;
        if (r0 != r5) goto L_0x0079;
    L_0x0065:
        goto L_0x00a9;
    L_0x0066:
        r0 = r4.length();
        if (r3 >= r0) goto L_0x007c;
    L_0x006c:
        r0 = r4.charAt(r3);
        r5 = 32;
        if (r0 == r5) goto L_0x0079;
    L_0x0074:
        r5 = 9;
        if (r0 == r5) goto L_0x0079;
    L_0x0078:
        goto L_0x007c;
    L_0x0079:
        r3 = r3 + 1;
        goto L_0x0066;
    L_0x007c:
        r0 = r4.length();
        if (r3 >= r0) goto L_0x0099;
    L_0x0082:
        r0 = r4.charAt(r3);
        r5 = 34;
        if (r0 != r5) goto L_0x0099;
    L_0x008a:
        r3 = r3 + 1;
        r0 = "\"";
        r0 = c.c.b.a.b.a.e.f.a(r4, r3, r0);
        r3 = r4.substring(r3, r0);
        r5 = 1;
        r0 = r0 + r5;
        goto L_0x00ae;
    L_0x0099:
        r5 = 1;
        r0 = ",;";
        r0 = c.c.b.a.b.a.e.f.a(r4, r3, r0);
        r3 = r4.substring(r3, r0);
        r3 = r3.trim();
        goto L_0x00ae;
    L_0x00a9:
        r5 = 1;
        r3 = r3 + 1;
        r0 = r3;
        r3 = 0;
    L_0x00ae:
        r5 = "no-cache";
        r5 = r5.equalsIgnoreCase(r2);
        if (r5 == 0) goto L_0x00ba;
    L_0x00b6:
        r5 = -1;
        r9 = 1;
        goto L_0x0144;
    L_0x00ba:
        r5 = "no-store";
        r5 = r5.equalsIgnoreCase(r2);
        if (r5 == 0) goto L_0x00c6;
    L_0x00c2:
        r5 = -1;
        r10 = 1;
        goto L_0x0144;
    L_0x00c6:
        r5 = "max-age";
        r5 = r5.equalsIgnoreCase(r2);
        if (r5 == 0) goto L_0x00d5;
    L_0x00ce:
        r5 = -1;
        r11 = c.c.b.a.b.a.e.f.d(r3, r5);
        goto L_0x0144;
    L_0x00d5:
        r5 = "s-maxage";
        r5 = r5.equalsIgnoreCase(r2);
        if (r5 == 0) goto L_0x00e3;
    L_0x00dd:
        r5 = -1;
        r12 = c.c.b.a.b.a.e.f.d(r3, r5);
        goto L_0x0144;
    L_0x00e3:
        r5 = "private";
        r5 = r5.equalsIgnoreCase(r2);
        if (r5 == 0) goto L_0x00ee;
    L_0x00eb:
        r5 = -1;
        r13 = 1;
        goto L_0x0144;
    L_0x00ee:
        r5 = "public";
        r5 = r5.equalsIgnoreCase(r2);
        if (r5 == 0) goto L_0x00f9;
    L_0x00f6:
        r5 = -1;
        r14 = 1;
        goto L_0x0144;
    L_0x00f9:
        r5 = "must-revalidate";
        r5 = r5.equalsIgnoreCase(r2);
        if (r5 == 0) goto L_0x0104;
    L_0x0101:
        r5 = -1;
        r15 = 1;
        goto L_0x0144;
    L_0x0104:
        r5 = "max-stale";
        r5 = r5.equalsIgnoreCase(r2);
        if (r5 == 0) goto L_0x0115;
    L_0x010c:
        r2 = 2147483647; // 0x7fffffff float:NaN double:1.060997895E-314;
        r16 = c.c.b.a.b.a.e.f.d(r3, r2);
        r5 = -1;
        goto L_0x0144;
    L_0x0115:
        r5 = "min-fresh";
        r5 = r5.equalsIgnoreCase(r2);
        if (r5 == 0) goto L_0x0123;
    L_0x011d:
        r5 = -1;
        r17 = c.c.b.a.b.a.e.f.d(r3, r5);
        goto L_0x0144;
    L_0x0123:
        r5 = -1;
        r3 = "only-if-cached";
        r3 = r3.equalsIgnoreCase(r2);
        if (r3 == 0) goto L_0x012f;
    L_0x012c:
        r18 = 1;
        goto L_0x0144;
    L_0x012f:
        r3 = "no-transform";
        r3 = r3.equalsIgnoreCase(r2);
        if (r3 == 0) goto L_0x013a;
    L_0x0137:
        r19 = 1;
        goto L_0x0144;
    L_0x013a:
        r3 = "immutable";
        r2 = r3.equalsIgnoreCase(r2);
        if (r2 == 0) goto L_0x0144;
    L_0x0142:
        r20 = 1;
    L_0x0144:
        r2 = r0;
        r0 = r22;
        goto L_0x003b;
    L_0x0149:
        r5 = -1;
        r6 = r6 + 1;
        r0 = r22;
        goto L_0x001a;
    L_0x0150:
        if (r7 != 0) goto L_0x0155;
    L_0x0152:
        r21 = 0;
        goto L_0x0157;
    L_0x0155:
        r21 = r8;
    L_0x0157:
        r0 = new c.c.b.a.b.i;
        r8 = r0;
        r8.m945init(r9, r10, r11, r12, r13, r14, r15, r16, r17, r18, r19, r20, r21);
        return r0;
        */
        throw new UnsupportedOperationException("Method not decompiled: c.c.b.a.b.i.a(c.c.b.a.b.v):c.c.b.a.b.i");
    }

    public String toString() {
        String str = this.m;
        if (str == null) {
            StringBuilder stringBuilder = new StringBuilder();
            if (this.a) {
                stringBuilder.append("no-cache, ");
            }
            if (this.b) {
                stringBuilder.append("no-store, ");
            }
            String str2 = ", ";
            if (this.c != -1) {
                stringBuilder.append("max-age=");
                stringBuilder.append(this.c);
                stringBuilder.append(str2);
            }
            if (this.d != -1) {
                stringBuilder.append("s-maxage=");
                stringBuilder.append(this.d);
                stringBuilder.append(str2);
            }
            if (this.e) {
                stringBuilder.append("private, ");
            }
            if (this.f) {
                stringBuilder.append("public, ");
            }
            if (this.g) {
                stringBuilder.append("must-revalidate, ");
            }
            if (this.h != -1) {
                stringBuilder.append("max-stale=");
                stringBuilder.append(this.h);
                stringBuilder.append(str2);
            }
            if (this.i != -1) {
                stringBuilder.append("min-fresh=");
                stringBuilder.append(this.i);
                stringBuilder.append(str2);
            }
            if (this.j) {
                stringBuilder.append("only-if-cached, ");
            }
            if (this.k) {
                stringBuilder.append("no-transform, ");
            }
            if (this.l) {
                stringBuilder.append("immutable, ");
            }
            if (stringBuilder.length() == 0) {
                str = "";
            } else {
                stringBuilder.delete(stringBuilder.length() - 2, stringBuilder.length());
                str = stringBuilder.toString();
            }
            this.m = str;
        }
        return str;
    }
}
